import numpy as np

def s(x :int,c):
    N=4
    k=np.array([a for a in range(N)])
    e=np.exp(1j*k*x)
    e.reshape((N,1))
    return np.dot(c,e)

c = np.array([1, 2, 3, 4])  # 系数数组
x_single = 2  # 单个整数
x_array = np.array([1, 2, 3])  # 整数数组

result_single = s(x_single, c)
result_array = s(x_array, c)

print("单个整数插值结果:", result_single)
print("整数数组插值结果:", result_array)
